package com.treetao.union.db.model;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.treetao.union.db.model.base.TTBaseVO;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单主表
 * </p>
 *
 * @author Dev.M
 * @since 2020-04-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mall_order")
public class MallOrder extends TTBaseVO<MallOrder> {

    private static final long serialVersionUID = 1L;

    /**
     * 订单号
     */
	private Long orderno;
    /**
     * 商品总数
     */
	private Integer pcount;
    /**
     * 用户ID
     */
	private Long userId;
    /**
     * 下单时间
     */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
	private Date createTime;
	
	/**
	 * 发货时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
	private Date sendTime;
    /**
     * 支付方式(weixin
     */
	private String payWay;
    /**
     * 订单总金额
     */
	private Double priceTotal;
    /**
     * 运费
     */
	private Double priceFreight;
    /**
     * 实际付款金额
     */
	private Double priceReal;
    /**
     * 在字典中定义，（10，20这样）
     */
	private Integer status;
	/**
	 * 订单备注
	 */
	private String remark;


	@TableField(exist = false)
	private List<MallOrderDetail> details ;
	
	@TableField(exist = false)
	private MallOrderExpress express;
	
	@TableField(exist = false)
	private List<MallOrderRecord> records;
}
